package gc2012.round1a;


import java.util.Arrays;
import java.util.Comparator;

import common.AbstractRunner;
import common.AbstractRunner.SIZE;

public class A extends AbstractRunner {
	
	
	@Override
	public void handleCase(int caseNumber) throws Exception {		
		int a = scanner.nextInt();
		int b = scanner.nextInt();
		
		double[] p = new double[a];
		double[] pcumulative = new double[a+1];
		pcumulative[0] = 1;
		for (int i=0; i<a; i++) {
			p[i] = scanner.nextDouble();
			pcumulative[i+1] = pcumulative[i] * p[i];
		}
				
		double best = 1 + b + 1;
		//System.out.println("X: "+best);
		for (int i=0; i<=a; i++) {
			double cur =  i+(b-a+i)+1 + (b + 1)*(1-pcumulative[a-i]);
			best = Math.min(cur, best);
			//System.out.println(i+ ": "+cur+" "+pcumulative[a-i]);
		}
		out.write(best+"\n");
		
	}
	
	public static void main(String[] args) throws Exception {
		new A().init(SIZE.large).execute();
	}
}

